ImagXpress 13 for ActiveX - User Guide > How To > Load an Image > Load Image from File |
Prior to loading an image, set the load options to provide specific instructions for loading the image. If no load options are specified, ImagXpress® uses default values when loading the image.
To load an image from a file, set the FileName property to the path and filename you want to load. ImagXpress looks at the file extension to recognize the file type. If the FileName property is set to a valid filename, ImagXpress opens the file, reads the header information, and loads the image. When an image is loaded from file, it is stored as a DIB. This DIB, with the image's palette information, tag information and color profile information are stored in the target ImagXpress buffer (identified by the ProcessImageID property). The ViewImageID is set to the newly loaded image, enabling the display of the new image.
Check the check the ImageStatus method to understand the current loading status of the image. |
ImagXpress loads files from FTP and HTTP asynchronously. The image will not have been loaded immediately after setting the FileName property. The user should either rely on the ImageStatus event or the Progress event to determine when an FTP or HTTP file has been loaded and another operation can be performed on the image.
If the file is extremely large and heavily compressed, such as a JPEG image and the computer was slow, then it could take more than a few seconds to decode the image and display it. To let the user know that the computer is working and not locked up, set the ViewProgressive property to True. With ViewProgressive active, the image displays incrementally, as it decodes, instead of waiting until the control finishes loading it. ViewProgressive is useful when loading large images over the Internet. |
ImagXpress supports the following multi-page image formats: TIFF, ICO, PDF, and DCX.
To decompress and load a multi page image from file, you must first set the PageNbr property to the page you want to load and then set the FileName property to load. You can use the NumPages method to find out how many pages in a file.